home *** CD-ROM | disk | FTP | other *** search
- Path: solon.com!not-for-mail
- From: seebs@solutions.solon.com (Peter Seebach)
- Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
- Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
- Date: 10 Apr 1996 15:21:58 -0500
- Organization: Usenet Fact Police (Undercover)
- Message-ID: <4kh596$ook@solutions.solon.com>
- References: <JSA.96Feb16135027@organon.com> <4kcpgkINNcku@keats.ugrad.cs.ubc.ca> <TYNOR.96Apr9105114@twratl.atlanta.twr.com> <4kgunm$o4o@gde.GDEsystems.COM>
- Reply-To: seebs@solon.com
- NNTP-Posting-Host: solutions.solon.com
-
- In article <4kgunm$o4o@gde.GDEsystems.COM>, Chet <kackman> wrote:
-
- [re: after 'int i, j;', is &i+1 == &j?]
-
- >If i = j depends on your unit of address. If i is assumed a longword then
-
- > &i + 4 = &j is true
- > not
- > &i + 1 = &j
-
- This is stupid.
-
- A compiler may order the objects in any order it wishes, unless they're in a
- struct, in which case they must be in declaration order, but there may be
- arbitrary padding if they're in a struct.
-
- But the main stupidity here is that, if i is a longword, &i+1 is one longword
- "up" from i.
-
- Please refrain from correcting my april fools' posting unless you know C,
- preferably reasonably well.
-
- -s
- --
- Peter Seebach - seebs@solon.com - Copyright 1996 Peter Seebach.
- C/Unix wizard -- C/Unix questions? Send mail for help. No, really!
- FUCK the communications decency act. Goddamned government. [literally.]
- The *other* C FAQ - http://www.solon.com/~seebs/c/c-iaq.html
-